<?php

class User extends AppModel {
	var $name = 'User';
	var $useTable = 'users';
	
	function afterFind($results) {
		foreach ($results as $key => $val) {
			if (isset($val['User']['created'])) {
				$results[$key]['User']['created'] = $this->dateFormatAfterFind($val['User']['created']);
		
			}
	
		}
	
		foreach ($results as $key => $val) {
			if (isset($val['User']['modified'])) {
				$results[$key]['User']['modified'] = $this->dateFormatAfterFind($val['User']['modified']);
		
			}
	
		}
	
		return $results;
	}

	function dateFormatAfterFind($dateString) {
		return date('d-M-Y', strtotime($dateString));
	}

}
